﻿import Box2D 2.0
import QtQuick 2.0

/*
  This body places 32-pixel wide invisible static bodies around the screen,
  to avoid stuff getting out.
*/
Item{

    Body {
        world: physicsWorld
        objectName: "bottom"

        Box {
            y: screen.height
            width: screen.width
            height: 32
        }
    }
    Body {
        world: physicsWorld
        objectName: "top"

        Box {
            y: -32
            height: 32
            width: screen.width
        }
    }
    Body {
        world: physicsWorld
        objectName: "left"
        bodyType: Body.Static

        Box {
            x: -32
            width: 32
            height: screen.height
            categories: Box.Category2
            collidesWith: Box.Category2
        }
    }
    Body {
        world: physicsWorld
        objectName: "right"
        bodyType: Body.Static

        Box {
            x: screen.width
            width: 32
            height: screen.height
            categories: Box.Category2
            collidesWith: Box.Category2
        }
    }
}
